package com.zhz.lib.project.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zhz.lib.project.domain.hotlink.Hotlink;
import com.zhz.lib.project.service.custom.CustomService;
import com.zhz.lib.project.service.hotlink.HotlinkService;
import com.zhz.lib.project.vo.custom.CustomVO;

/**
 * @author LiWei <a href="mailto:liwei2672@gmail.com">liwei2672@gmail.com</a>
 * @version 创建时间：2010-5-3 下午03:22:27
 * 
 */
@Controller
@RequestMapping("/chengyuanguanlink.htm")
public class ChengyuanguanlinkController {
    @Autowired
    private HotlinkService hotlinkService;
    @Autowired
    private CustomService  customService;

    /**
     * 最新消息列表(Ibatis)
     * 
     * @param model
     * @param request
     * @param response
     * @return
     */
    @SuppressWarnings("unchecked")
    @RequestMapping(method = RequestMethod.GET)
    public String getIbatisList(ModelMap model, HttpServletRequest request,
                                HttpServletResponse response) {
        // 西北地区各省中心
        List<Hotlink> xibeizhongxinchengyuanguanlink = hotlinkService.getHotLink("xibeizhongxinchengyuanguanlink");
        model.put("xibeizhongxinchengyuanguanlink", xibeizhongxinchengyuanguanlink);
        // 获取顶级模块
        List<CustomVO> customVOList = customService.getTopCustom();
        model.put("customVOList", customVOList);

        return "chengyuanguanlink";

    }

}
